<?php
if(!isset($_SESSION['user']))
{
  echo "请先登录!3秒后自动跳转！";
  //exit;//替换成跳转 
  header("Refresh:2;url=../login.html");
  exit;
}
?>